/**
 * Created by wxbing (wxbing000@163.com) on 2021/8/24.
 */

console.log('============================')
new Promise((resolve, reject) => {
    console.log('初始化');
    resolve();
})
    .then(() => {
        throw new Error('有哪里不对了');
        console.log('执行「这个」”');
    })
    .catch(() => {
        console.log('执行「那个」');
    })
    .then(() => {
        console.log('执行「这个」，无论前面发生了什么');
    });
console.log('============================')

Promise.resolve().then(() => console.log(2));
console.log(1); // 1, 2
